package com.shop.service;

import java.util.List;

import com.shop.bean.Address;

/** 
 * @className: IAddressService.java
 * @classDescription: 
 * @function: 
 * @author: Victor
 * @createTime: 2012-11-1 下午07:13:00
 * @modifyTime: 
 * @modifyReason: 
 * @since: JDK 1.6
 */
public interface IAddressService {
	/**
	 * 新建地址
	 * 
	 * @param address
	 * @throws Exception
	 */
	public int createAddress(Address address) throws Exception;

	/**
	 * 更新地址
	 * 
	 * @param address
	 * @throws Exception
	 */
	public int updateAddress(Address address) throws Exception;

	/**
	 * 根据Id删除地址
	 * 
	 * @param addressId
	 * @throws Exception
	 */
	public int deleteAddressById(long addressId) throws Exception;

	/**
	 * 根据Id查询地址
	 * 
	 * @param addressId
	 * @return
	 * @throws Exception
	 */
	public Address queryAddressById(long addressId) throws Exception;

	/**
	 * 查询所有的地址
	 * 
	 * @return
	 * @throws Exception
	 */
	public List<Address> queryAllAddress() throws Exception;
	
	/**
	 * 分页查询所有的用户地址
	 * @param pageSize
	 * @param pageNow
	 * @return
	 * @throws Exception
	 */
	public List<Address> queryAllAddress(int startPage,int pageSize) throws Exception;
}
